import request from '@/utils/request'

// 查询客户端用户列表
export function listUser(query) {
  return request({
    url: '/admin/user/list',
    method: 'get',
    params: query
  })
}

// 查询客户端用户列表
export function countrySortList(query) {
  return request({
    url: '/admin/user/countrySort',
    method: 'get',
    params: query
  })
}

// 查询客户端用户详细
export function getUser(id) {
  return request({
    url: '/admin/user/' + id,
    method: 'get'
  })
}

// 新增客户端用户
export function addUser(data) {
  return request({
    url: '/admin/user',
    method: 'post',
    data: data
  })
}

// 修改客户端用户
export function updateUser(data) {
  return request({
    url: '/admin/user',
    method: 'put',
    data: data
  })
}

// 删除客户端用户
export function delUser(id) {
  return request({
    url: '/admin/user/' + id,
    method: 'delete'
  })
}

// 导出客户端用户
export function exportUser(query) {
  return request({
    url: '/admin/user/export',
    method: 'get',
    params: query
  })
}

// 导出客户端用户
export function exportUserC() {
  return request({
    url: '/admin/user/exportCountrySort',
    method: 'get',
  })
}

// 导出客户端用户
export function exportUserB(data) {
  return request({
    url: '/admin/user_city_join/exportNew',
    method: 'post',
    data:data
  })
}


// 导出客户端用户
export function countCityUserNumByTime(data) {
  return request({
    url: '/admin/user_city_join/countCityUserNumByTime',
    method: 'post',
    data:data
  })
}
